﻿GAME_NFRAME=..
GAME_SRC_PATH=../../../../

# 检测操作系统类型
ifeq ($(OS),Windows_NT)
    # Windows系统下的规则
    IS_WINDOWS = 1
else
    # Linux系统下的规则
    IS_LINUX = 1
endif

GAME_INSTALL_PATH=${GAME_SRC_PATH}/Install
GAME_BIN_PATH=${GAME_INSTALL_PATH}/Bin
GAME_DATA_PATH=${GAME_INSTALL_PATH}/Config/Data
GAME_SQL_PATH=${GAME_INSTALL_PATH}/Sql
GAME_LUA_PB_PATH=${GAME_INSTALL_PATH}/LuaScript/CommonProto
GAME_BUILD_PATH=${GAME_SRC_PATH}/Build/NFServerComm/makefile

MAKEFILE_PATH=${GAME_SRC_PATH}/src/NFServer/NFServerComm/makefiles
MAKE_PROTOC_GEN=${MAKEFILE_PATH}/protoc_gen.makefile
MAKE_EXCEL_GEN=${MAKEFILE_PATH}/excel_gen.makefile

RESDB_EXCEL_PATH=${GAME_SRC_PATH}/Excel
PROTOCGEN_FILE_PATH=${GAME_BUILD_PATH}/temp

THIRD_PARTY_PATH=${GAME_SRC_PATH}/thirdparty
THIRD_PARTY_TOOLS_PATH=${THIRD_PARTY_PATH}/tools
THIRD_PARTY_INC_PATH=${THIRD_PARTY_PATH}/
ifeq ($(IS_WINDOWS), 1)
NANOPB_PLUGIN=..\..\..\..\thirdparty\nanopb\generator\protoc-gen-nanopb.bat
else
NANOPB_PLUGIN=${THIRD_PARTY_PATH}/nanopb/generator/protoc-gen-nanopb
endif
NANOPB_PLUGIN_PROTO=${THIRD_PARTY_PATH}/nanopb/generator/proto

TOOLS_PATH=${GAME_SRC_PATH}/tools
THIRD_PARTY_TOOLS_PATH=${TOOLS_PATH}
PROTOC=${TOOLS_PATH}/protoc
ifeq ($(IS_WINDOWS), 1)
NFEXCELPROCESS=${TOOLS_PATH}/NFExcelProcess.exe
else
NFEXCELPROCESS=${TOOLS_PATH}/NFExcelProcess
endif
FILE_COPY_EXE=${NFEXCELPROCESS}

MAKE_SINGLE_JOB_NUM=4

#######################
#protocol define
#######################

PROTOCOL_PATH=${GAME_SRC_PATH}/src/NFrame/NFComm/Message
PROTOCOL_SS_PATH=${GAME_SRC_PATH}/src/NFServer/NFServerComm/Message

PROTOCOL_SS_XML=$(wildcard ${PROTOCOL_SS_PATH}/*.proto)
PROTOCOL_SS_H=$(subst $(PROTOCOL_SS_PATH),$(PROTOCGEN_FILE_PATH),$(PROTOCOL_SS_XML:.proto=.pb.h))
PROTOCOL_SS_CPP=$(PROTOCOL_SS_H:.h=.cc)
PROTOCOL_SS_NANOPB_H=$(subst $(PROTOCOL_SS_PATH),$(PROTOCGEN_FILE_PATH),$(PROTOCOL_SS_XML:.proto=.nanopb.h))
PROTOCOL_SS_NANOPB_CPP=$(PROTOCOL_SS_NANOPB_H:.h=.cc)

PROTOCGEN_CPP= ${PROTOCOL_SS_CPP} ${PROTOCOL_SS_NANOPB_CPP}

PROTOCGEN_H=${PROTOCOL_SS_H} ${PROTOCOL_SS_NANOPB_H}

ALL_PROTOCGEN_FILE=${PROTOCGEN_CPP} ${PROTOCGEN_H}
NEW_PROTOCGEN_FILE_PATH=${GAME_SRC_PATH}/src/NFServer/NFServerComm/NFServerMessage

##########################
#
##########################
MAKE_COMPILE_LOG=${GAME_BUILD_PATH}/make_compile.log
MAKE_COMPILE_WARNING_LOG=${GAME_BUILD_PATH}/make_warning.log
MAKE_COMPILE_ERROR_LOG=${GAME_BUILD_PATH}/make_error.log
MAKE_DEPENDENT_LOG=${GAME_BUILD_PATH}/make_dependent.log
MAKE_DEPENDENT_ERROR_LOG=${GAME_BUILD_PATH}/make_dependent_error.log
MAKE_LINK_ERROR_LOG=${GAME_BUILD_PATH}/make_link_error.log

NEED_CLEAN_FILES=
